#include<bits/stdc++.h>
using namespace std;
const int N=16;
const int M=32768;

double x[N],y[N];
double dis[N][N];
double dp[N][M];
int n;

int main()
{
	scanf("%d",&n);
	x[0]=y[0]=0.0;
	for(int i=1;i<=n;i++)
	{
		scanf("%lf%lf",&x[i],&y[i]);
	}
	for(int i=0;i<=n;i++)
	{
		for(int j=i+1;j<=n;j++)
		{
			dis[i][j]=sqrt( pow(x[i]-x[j],2)+pow(y[i]-y[j],2) );
			dis[j][i]=dis[i][j];
		}
	}
	memset(dp,127,sizeof(dp));
	double ans=dp[0][0];
	queue<int> que;
	for(int i=1;i<=n;i++)
	{
		dp[i][1<<(i-1)]=dis[0][i];
		que.push(i);
		que.push(1<<(i-1));
	}

	int maxnum=(1<<n)-1;
	bool visit[N][M];
	for(int i=2;i<=n;i++)
	{
		int size=que.size();
		memset(visit,false,sizeof(visit));
		for(int j=0;j<size;j+=2)
		{
			int s=que.front();
			que.pop();
			int num=que.front();
			que.pop();
			if(visit[s][num]==true) continue;
			//cout<<s<<" "<<num<<" "<<dp[s][num]<<endl;
			for(int u=1,t=1;t<=n;u*=2,t++)
			{
				if( (u&num)==0)
				{
					dp[t][num+u]=min(dp[t][num+u],dp[s][num]+dis[s][t]);
					que.push(t);
					que.push(num+u);
					//cout<<t<<" "<<num+t<<" "<<dp[t][num+u]<<endl;
				}
			}
			visit[s][num]=true;
		}
	}

	for(int i=1;i<=n;i++)
	{
		ans=min(ans,dp[i][maxnum]);
	}
	printf("%.2lf",ans);
	return 0;
}
